#ifndef DRWINTITLE_H
#define DRWINTITLE_H

#include <QWidget>
#include <QMouseEvent>
#include <QDebug>

namespace Ui {
class DRWinTitle;
}

class DRWinTitle : public QWidget
{
    Q_OBJECT

public:
    explicit DRWinTitle(QWidget *parent = 0);
    ~DRWinTitle();

signals:
    void onMove(int , int);
    void onClose();
    void onMinimum();
    void onMaximun(bool);

public slots:
    void maximum();
    void minimum();

private:
    Ui::DRWinTitle *ui;
    void mousePressEvent(QMouseEvent * event);
    void mouseReleaseEvent(QMouseEvent * event);
    void mouseDoubleClickEvent(QMouseEvent * event);
    void mouseMoveEvent(QMouseEvent * event);

private:
    bool maxed;
    bool pressed;
    int x, y;
};

#endif // DRWINTITLE_H
